/*
 * TwoEntry.h
 *
 * Created on: 05-05-2014
 *     Author: A.W. Janisse
 *
 * Version 1.0: 24-05-2014, Final release
 */

#ifndef TWOENTRY_H
#define TWOENTRY_H

#include <string>
#include <Gate.h>

using namespace std;

class TwoEntry : public Gate
{
    public:
        // pre :
        // post: An object is constructed with the given parameters.
        TwoEntry(int x, int y, string type);

        // pre :
        // post: If exists the entry is returned else NULL will be returned.
        Gate * getEntry(int nr);

        // pre :
        // post: If there is a free entry then entry equals to gate and return true
        //       else return false.
        bool connectEntryTo(Gate *gate);

        // pre :
        // post: If entry1 equals gate then entry1 is set to NULL and return true if entry2 equals
        //       gate then entry2 is set to NULL and return true else return false.
        bool removeEntryTo(Gate *gate);

        // pre :
		// post: Please see decendants for a descripion.
        virtual string getDrawingInstruction() = 0;

        // pre :
		// post: Please see decendants for a descripion.
        virtual int getOutputValue() = 0;
    private:
        Gate *entry1;
        Gate *entry2;
};

#endif // TWOENTRY_H
